<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>8-炸弹定时器</title>
	</head>
	<body>
		<img src="images/2.jpg" style="display:none;">
		<script type="text/javascript">
			//参数1：函数
			//参数2：毫秒数
			//window.setTimeout(回调函数,毫秒数);
			//window可省略,直接写函数
 			/*
			window.setTimeout(function(){
				console.log('爆炸了...');
			},3000); 
			*/
			//2.传递函数名
			
			//字符串'show()'
 			/*setTimeout(show,3000);
			function show(){
				document.querySelector('img').style.display='block';
			} */
			
			setTimeout('show()',3000);
			function show(){
				document.querySelector('img').style.display='block';
			}
			
			
		</script>
	</body>
</html>
